package libs.yzx.zaza;

import android.os.Bundle;
import android.os.Handler;
import android.support.annotation.Nullable;
import android.support.v7.app.AppCompatActivity;
import android.widget.Toast;

/**
 * Created by Administrator on 2016/7/29
 */
public class DataBindingActivity extends AppCompatActivity {

    public static int count = 0;

    @Override
    protected void onCreate(@Nullable Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);

        Toast.makeText(DataBindingActivity.this, "" + count++, Toast.LENGTH_SHORT).show();

    }

    @Override
    public void onBackPressed() {

        new Handler().postDelayed(new Runnable() {
            public void run() {
                android.os.Process.killProcess(android.os.Process.myPid());
                //System.exit(0);
            }
        }, 2000);
    }
}
